<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>BLOG OF SUOYAO.SHEN</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="/site_media/css/default.css" rel="stylesheet" type="text/css" />
<link href="/site_media/js/kindeditor/plugins/code/prettify.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!-- start header -->
{% include "includes/header.html"%}
<!-- end header -->
<!-- start page -->
<div id="page">
	<!-- start content -->
	<div id="content">
		<!-- start latest-post -->
		<div class="latest-post-content post">
			<h1 class="title">{{diary.title}}</h1>
			<p class="meta"><small>Posted by {{diary.author}} on {{diary.write_time|date}}</small></p>
			<div class="entry">
				{{diary.content|safe}}
			</div>
		</div>
		<!-- end latest-post -->
		<!-- start comment list -->
		<div class="latest-post-content">
			<ol class="commentlist">
				{% for comment in comment_list %}
					<li>
						<cite>{{ comment.author_name }}</cite>
						<small class="commentmeta">{{ comment.comment_time }}</small>
						<div class="commenttxt">{{ comment.content|safe }}</div>
					</li>
				{% endfor %}
			</ol>
		</div>
		<div style="clear: both;">&nbsp;</div>
		<!-- start comment form -->
		<div class="latest-post-content">
			<form id="commentForm" name="commentForm" action="/saveComment/" method="post">
				{% csrf_token %}
				<input type="hidden" name="diary_id" value="{{diary.id}}" />
				<table cellpadding="0" cellspacing="0" class="comment-form">
					<tr>
						<td style="width: 60px;">&nbsp;昵称:&nbsp;</td>
						<td><input type="text" name="author_name" class="comment-input" /></td>
					</tr>
					<tr>
						<td>&nbsp;邮箱:&nbsp;</td>
						<td><input type="text" name="author_email" class="comment-input" /></td>
					</tr>
					<tr>
						<td>&nbsp;主页:&nbsp;</td>
						<td><input type="text" name="author_url" class="comment-input" /></td>
					</tr>
					<tr>
						<td colspan="2">
							<textarea name="content" rows="" cols="" style="width:600px;height:180px;"></textarea>
						</td>
					</tr>
					<tr>
						<td colspan="2" style="text-align: left;">
							<a href="javascript:;" class="comment" onclick="editor.sync();$('#commentForm').submit();" style="color:#CCCCCC;">提交评论</a>
						</td>
					</tr>
				</table>
			</form>
		</div>
		
		<div style="clear: both;">&nbsp;</div>
	</div>
	<!-- end content -->
	<!-- start sidebar -->
	<div id="sidebar-content"></div>
	<!-- end sidebar -->
</div>
<!-- end page -->
{% include "includes/footer.html"%}
<script src="/site_media/js/jquery/jquery-1.7.2.min.js" type="text/javascript"></script>
<script charset="utf-8" src="/site_media/js/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="/site_media/js/kindeditor/lang/zh_CN.js"></script>
<script charset="utf-8" src="/site_media/js/kindeditor/tools/simple-options.js"></script>
<script charset="utf-8" src="/site_media/js/kindeditor/plugins/code/prettify.js"></script>
<script type="text/javascript">
	var editor;
	jQuery(document).ready(function($){
	    prettyPrint();
	    KindEditor.ready(function(K) {
	        editor = K.create('textarea[name="content"]',{items: options});
	    });
	})
</script>
</body>
</html>